﻿namespace NetFx.SMIL.Definitions
{
  using System;
  using System.Text;
  using System.Collections;

  using System.Reflection;
  using System.Reflection.Emit;
  using System.Runtime.InteropServices;

  using System.Diagnostics;
  using System.Diagnostics.CodeAnalysis;
  using System.Diagnostics.SymbolStore;
  using System.Security;
  using System.Security.Permissions;

  using NetFx.MSIL;
  using NetFx.MSIL.Headers;

  public class FieldDefinition : ComplexDefinition
  {
    #region Statics
    public static FieldDefinition of(string name)
    {
      return new FieldDefinition(name);
    }
    #endregion
    #region Fields
    protected string fieldType;
    #endregion
    #region Properties
    public virtual FieldHeader InstanceHeader
    {
      get
      {
        return this.header as FieldHeader;
      }
    }
    public virtual FieldAttributes Attributes
    {
      get
      {
        return this.InstanceHeader.Attributes;
      }
      set
      {
        this.InstanceHeader.Attributes = value;
      }
    }
    public virtual string FieldType
    {
      get
      {
        return this.fieldType;
      }
      set
      {
        this.fieldType = value;
      }
    }
    public virtual bool IsStatic
    {
      get
      {
        return this.InstanceHeader.IsStatic;
      }
      set
      {
        this.InstanceHeader.IsStatic = value;
      }
    }
    public virtual bool IsInitialized
    {
      get
      {
        return this.InstanceHeader.IsInitialized;
      }
      set
      {
        this.InstanceHeader.IsInitialized = value;
      }
    }
    public virtual int StaticSize
    {
      get
      {
        return this.InstanceHeader.StaticSize;
      }
      set
      {
        this.InstanceHeader.StaticSize = value;
      }
    }
    public virtual byte[] StaticData
    {
      get
      {
        return this.InstanceHeader.StaticData;
      }
      set
      {
        this.InstanceHeader.StaticData = value;
      }
    }
    public virtual object DefaultValue
    {
      get
      {
        return this.InstanceHeader.DefaultValue;
      }
      set
      {
        this.InstanceHeader.DefaultValue = value;
      }
    }
    public virtual UnmanagedMarshal UnmanagedMarshal
    {
      get
      {
        return this.InstanceHeader.UnmanagedMarshal;
      }
      set
      {
        this.InstanceHeader.UnmanagedMarshal = value;
      }
    }
    public virtual int FieldOffset
    {
      get
      {
        return this.InstanceHeader.FieldOffset;
      }
      set
      {
        this.InstanceHeader.FieldOffset = value;
      }
    }
    #endregion
    #region Constructors
    public FieldDefinition(string name)
      : this(FieldHeader.of(name))
    {

    }
    public FieldDefinition(FieldHeader header)
      : base(header)
    {

    }
    #endregion
    #region Methods
    protected override void Resolve(ComplexDefinition container)
    {

    }
    #endregion
  }
}